<template>
  <div class="home-swiper">
    <Swiper @transitionEnd="swiperEnd">
      <SwiperItem v-for="(item, index) in swiperList" :key="index">
        <a :href="item.link">
          <img :src="item.image" alt @load="imgload" />
        </a>
      </SwiperItem>
    </Swiper>
  </div>
</template>

<script>
import { Swiper, SwiperItem } from "@/components/common/swiper";
import { getHomeMultidata } from "@/network/home.js";

export default {
  name: "home-swiper",
  components: {
    Swiper,
    SwiperItem
  },
  props: {
    swiperList: Array
  },
  data() {
    return {
      isLoad: false
    };
  },
  methods: {
    swiperEnd(index) {},
    imgload() {
      if (!this.isLoad) {
        this.$emit("swiperImgLoad");
        this.isLoad = true;
      }
    }
  }
};
</script>

<style scoped>
</style>